﻿using System;
using System.Collections.Generic;
using Yaml.Utilities;

namespace Yaml.Serialization.Events {
    public class DocumentStartEvent : DocumentEvent {
        private string versionDirective = null;
        private Map tagDirectives;

        public DocumentStartEvent(bool isImplicit, string versionDirective, Map tagDirectives) : base(isImplicit) {
            Requires.NotNull(versionDirective);
            Requires.That(versionDirective == "1.1", "%YAML directive can only specify Version 1.1");

            this.versionDirective = versionDirective;
            this.tagDirectives = tagDirectives;
        }

        public string VersionDirective {
            get { return this.versionDirective; }
        }

        public Map TagDirectives {
            get { return this.tagDirectives; }
        }

    }
}
